package com.itljm.cxrMarket.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itljm.cxrMarket.entity.Products;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itljm.cxrMarket.entity.dto.CategoryProductsDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProductsMapper extends BaseMapper<Products> {
    List<Products> selectProductPage(Page<Products> page, @Param("ew") Wrapper<Products> entityWrapper);
    int reduceStockQuantity(@Param("productId") Integer productId, @Param("quantity") int quantity);
    Integer getStockQuantity(@Param("productId") Integer productId);
    int updateProductStatusByMerchantId(@Param("merchantId")Integer merchantId, @Param("status") Integer status);
}




